package com.mingzhi.logisticsservice.listener;

import com.mingzhi.order.model.OrderInfo;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = "order.create")
public class OrderListener {

    @RabbitHandler
    public void handMessage(String orderInfo) {
        System.out.println("接收到订单消息：String" + orderInfo);
        //  处理订单消息 ......
    }

    @RabbitHandler
    public void handMessage(OrderInfo orderInfo) {
        System.out.println("接收到订单消息：OrderInfo" + orderInfo);
        //  处理订单消息 ......
    }
}
